package com.recource.domain;

import com.recource.constant.StaticConstant;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * 〈一句话功能简述〉<br> 
 * 〈用户数据Javabean类〉
 *
 * @author OneStar
 * @create 2019/12/17
 * @since 1.0.0
 */
@Data
@TableName("t_user")
public class User {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField("username")
    private String username;
    @TableField("password")
    private String password;

    @TableField("phone")
    private String phone;

    @TableField("salt")
    private String salt;

    @TableField("userType")
    private int userType;
    @TableField("time")
    @JsonFormat(pattern = StaticConstant.DATE_FORMAT, timezone = StaticConstant.GMT8)
    private Date time = new Date();

    @TableField(exist = false)
    private boolean flag = false;

    @TableField(exist = false)
    private String did;
}